<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>编辑信息</title>
    <link rel="stylesheet" href="../css/page-health-orderInfo.css" />
    <link rel="stylesheet" href="../css/page-health-recordDetail.css" />
    <link rel="stylesheet" href="../plugins/elementui/index.css" />
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
</head>

<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
    <div id="app" class="app">
        <!-- 页面头部 -->
        <div class="top-header">
            <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i>返回</span>
            <span class="center">传智健康</span>
        </div>
        <!-- 页面内容 -->
        <div class="contentBox">
            <div class="list-content">
                <div class="fix-info">
                    <ul id="memberfile" class="list-unstyled" style="display: block">
                        <li><span class="tit">档案号</span>{{memberfile.id}}</li>
                        <li><span class="tit">姓名</span>{{memberfile.name}}</li>
                        <li><span class="tit">体重</span>{{memberfile.weight}}kg</li>
                        <li><span class="tit">身高</span>{{memberfile.height}}cm</li>
                        <li><span class="tit">健康状况</span>{{memberfile.health}}</li>
                        <li><span class="tit">婚否</span>{{memberfile.martal_status==0?'未婚':'已婚'}}</li>
                    </ul>
                </div>
            </div>
            <div class="form-info" id="addfile" style="display:none">
                <span style="align-content: center">暂无档案，请联系您的健康师</span>
                <div class="box-button">
                    <button @click="submitOrder()" type="button" class="btn order-btn">创建档案</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 页面 css js -->
    <!-- <script src="health-index.js"></script> -->
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            memberfile:{}
        },
        mounted(){
            axios.get("/member/getmemberfile.do").then((resp) => {
                if (resp.data.flag) {
                    if (resp.data.data == null){
                        document.querySelector("#memberfile").style.display='none';
                        document.querySelector("#addfile").style.display='block';
                    }else {
                        this.memberfile = resp.data.data;
                    }
                }else {
                    this.$message.error(resp.data.message);
                }
            });
        }
    });
</script>
</body>
</html>